<?php
$isReloadable = true;
require_once("../../../pers/inc.config.php");
require_once('../../_inc/inc.session.php');
require_once('../../_inc/funct.html.php');

$sql_sel = "SELECT s.* FROM ovf_anag_sez s " .
		" ORDER BY s.seq,s.cod_sez ";
$objDB->query($sql_sel,'selRec');
$aAsez = array();
while($acX = $objDB->fetch('selRec')) { 
	$aAsez[$acX['cod_sez']] = $acX;
}
$cmdL = "";
$cmdR = "&nbsp;&nbsp;&nbsp;";
if (true) {
	$cmdR .= "<a class=\"cmd1\" href=\"asezIns.php?$sXSNQS\">"._t("nuova sezione")."</a>";
}
$cmdR .= cmdTorna(); 

testaHtml('Gestione sezioni anagrafica','Lista sezioni', $msgPag, 'gest');
echo getHtmlForm();
echo getHtmlHidden('xsn',XSN);
echo getHtmlHidden('startoffset');
?>
<table class="cmd1" border="0" cellpadding="3" cellspacing="1" width="100%" align='center'>
   <tr>
      <td class="cmd1" align="left">
         <?=$cmdL?>
      </td>
      <td class="cmd1" align="right">
         <?=$cmdR?>
      </td>
   </tr>
</table>
<table class="tab1" border="0" cellpadding="3" cellspacing="1" width="100%" align='center'>
   <tr>
      <td class="lab1" width='1%' align='center' >&nbsp;</td>
      <td class="lab1" width='10%' align='center' >Codice</td>
      <td class="lab1" width='4%' align='center' >Tipo</td>
      <td class="lab1" width='35%' align='center'>Descrizione</td>
      <td class="lab1" width='50%' align='center'>URL</td>
   </tr>
<? 
$clRF = 'txt2';
foreach($aAsez as $kX => $acX) { 
	$clRF = ($clRF=='txt1')?'txt2':'txt1';	
?>
   <tr>
      <td class="<?=$clRF?>"><? echo $acX['seq'];?>&nbsp;</td>
      <td class="<?=$clRF?>">
      	<a href='asezView.php?cod=<?=$acX['cod_sez']."&$sXSNQS"?>' class="<?=$clRF?>"
      	 	style='font-family:lucida console,courier;'><?echo $acX['cod_sez'];?></a>
      </td>
      <td class="<?=$clRF?>"><? echo $acX['tipo_sez'];?></td>
      <td class="<?=$clRF?>"><? echo $acX['descr'];?></td>
      <td class="<?=$clRF?>"><? echo $acX['url_ext'];?></td>
   </tr>
<?php
}
?>
</table>
<table class="cmd1" border="0" cellpadding="3" cellspacing="1" width="100%" align='center'>
   <tr>
      <td class="cmd1" align="left">
         <?=$cmdL?>
      </td>
      <td class="cmd1" align="right">
         <?=$cmdR?>
      </td>
   </tr>
</table>
<?
echo "</form>\n";
codaHtml();
exit();

